Scripting > CxScript > PointTag Object > PointTag Methods

PointTag Methods

The PointTag object contains the following method:

IsValid

If any one of the following tag formats is in the PointTag object, the IsValid() method returns true; otherwise, it returns false:

Note: The requested tag component is returned even if the tag type is invalid. IsValid does not verify that the point actually exists.

Syntax

IsValid() As Boolean

Example

Site.Service.PointId:LongPointId:Facility.UDC is validated by the following sample script:

Sub PointTagSample

Dim PointTag, strValid

Set PointTag = CreateObject("CxScript.PointTag")

 

PointTag.Site = "Site"

PointTag.Service = "Service"

PointTag.PointId = "PointID"

PointTag.LongPointId = "LongPointID"

PointTag.Facility = "Facility"

PointTag.Udc = "UDC"

 

If PointTag.IsValid() Then

strValid = "Valid"

Else

strValid = "Invalid"

End If

 

msgBox "Tag " & PointTag.Tag & " is " & strValid

End Sub


Let us know how we can improve this topic.

CygNet at weatherford.com

© 2020 Weatherford. All rights reserved.